﻿using System;
using System.Collections.Generic;
using UnityEngine;

namespace UniRx.Examples
{
	// Token: 0x020001EC RID: 492
	public class Sample08_DetectDoubleClick : MonoBehaviour
	{
		// Token: 0x06000A48 RID: 2632 RVA: 0x000375B4 File Offset: 0x000359B4
		private void Start()
		{
			IObservable<long> source = from _ in Observable.EveryUpdate()
			where Input.GetMouseButtonDown(0)
			select _;
			(from xs in source.Buffer(source.Throttle(TimeSpan.FromMilliseconds(250.0)))
			where xs.Count >= 2
			select xs).Subscribe(delegate(IList<long> xs)
			{
				Debug.Log("DoubleClick Detected! Count:" + xs.Count);
			});
		}
	}
}
